package com.domor.service.project;

import com.domor.dao.project.ProjectDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ProjectService {

	@Autowired
	private ProjectDao dao;
	
	public List<Map<String , Object>> queryProject(Map<String, Object> params){
		return dao.queryProject(params);
	}
	
	public List<Map<String , Object>> queryDemand(Map<String, Object> params){
		return dao.queryDemand(params);
	}
	
	public Map<String, Object> getById(int projectId) {
		return dao.getById(projectId);
	}
	
	public int getByName(String name) {
		return dao.getByName(name);
	}

	public int insertProject(Map<String,Object> params) {
		return dao.insertProject(params);
	}
	public int updateProject(Map<String,Object> params) {
		return dao.updateProject(params);
	}
	public int deleteProject(int proId) {
		return dao.deleteProject(proId);
	}
	
	public int insertDemand(Map<String,Object> params) {
		return dao.insertDemand(params);
	}
	public int updateDemand(Map<String,Object> params) {
		return dao.updateDemand(params);
	}
	

	public List<Map<String,Object>> queryCustomer(Map<String, Object> params) {
		return dao.queryCustomer(params);
	}
	
	public List<Map<String,Object>> queryContact(Map<String, Object> params) {
		return dao.queryContact(params);
	}

}
